<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>类式组件</title>
</head>
<body>
    <script src="../js/react.development.js"></script>
    <script src="../js/react-dom.development.js"></script>
    <script src="../js/babel.min.js"></script>
    <div id="test"></div>
    <script type="text/babel">
        class Myself extends React.Component{
            render(){
                console.log('render中的this:',this);
                return(
                    <div>
                        Hello {this.props.name}
                    </div>
                )
            }
        }
        ReactDOM.render(<Myself />,document.getElementById('test'))
    </script>
</body>
</html>